<!doctype html><html lang=en-US><head><meta charset=utf-8>
<title>The Nu Html Checker (v.Nu)</title>
<link href="site/icon.png" rel="icon">
<style>
html {
  background: #dde5d9 url("") repeat 0 0;
  font-family: "Lucida Sans Unicode", "Lucida Sans", Verdana, Arial, Helvetica;
}

body {
  border: 1px solid #ced4ca;
  background-color: #fff;
  padding: 4px 25px;
  margin: 20px 20% 20px 20px;
  line-height: 1.75;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  color: #0b5b9d;
  vertical-align: top;
  margin-bottom: 0;
}

h1 {
  font-size: 36px;
}

h2 {
  font-size: 28px;
  margin-top: 24px;
}

h3 {
  font-size: 22px;
  margin-top: 32px;
}

h4 {
  font-size: 20px;
  margin-top: 22px;
}

a {
  text-decoration: none;
  color: #0b5b9d;
  padding: 2px;
}

a:hover {
  text-decoration: none;
  background-color: #0b5b9d;
  color: #fff;
}

a:hover code {
  background-color: #0b5b9d;
  border: none;
}

a:active {
  text-decoration: none;
  background-color: #fff;
  color: #000;
}

h1 a:hover {
  background-color: inherit;
  color: #fff;
}

.set,
.note {
  background-color: #fffff0;
  padding: 4px 32px;
  border: 1px solid #ccc;
  margin-left: 2px;
  margin-right: 2px;
  border-radius: 6px;
}
.note {
  background-color: #f1fff0;
}

.note p {
  margin-top: 8px;
}

code {
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 2px 6px;
}

pre {
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 10px;
  margin-right: 15%;
  margin-top: 6px;
  line-height: 1.2;
}

pre.aligned {
  margin-left: 40px;
}

.java-class,
.java-property,
.option-value {
  background-color: #ff0;
  padding: 2px 6px;
}

.arg {
  color: #008000;
}

.links {
  text-align: center;
}

a b {
  font-weight: 400;
}

li > ul {
  padding-top: 6px;
  padding-bottom: 8px;
}
</style>
</head>
<body>
  <h1>The Nu Html Checker (v.Nu)
    <a href="https://gitter.im/validator/validator"
    ><img src="https://goo.gl/1kHqwI" alt="Chat room"></a>
    <a href="https://github.com/validator/validator/releases/latest"
    ><img src="https://goo.gl/3PC2Qn" alt="Download latest"></a>
  </h1>
    <p>
    The Nu Html Checker (v.Nu) helps you <a
    href="https://validator.w3.org/nu/about.html#why-validate">catch unintended mistakes in your
    HTML, CSS, and SVG</a>. It enables you to <a
    href="https://validator.github.io/validator/#usage">batch-check
    documents from the command line</a> and from other scripts/apps, and to
    <a href="https://validator.github.io/validator/#standalone">deploy your
    own instance of the checker as a service</a> (like <a
    href="https://validator.w3.org/nu/">validator.w3.org/nu</a>).

    Its
    <a href="https://github.com/validator/validator">source code is available</a>,
    as are
    <a href="https://validator.github.io/validator/#build-instructions">instructions on how to build, test, and run the code</a>.

    <p>
    A <a href="https://hub.docker.com/r/validator/validator/">Dockerfile</a>
    (see the <a href="#dockerhub"><b>Pulling from Docker Hub</b></a>
    section below) and
    <a href="https://www.npmjs.com/package/vnu-jar">npm</a>,
    <a href="https://github.com/svenkreiss/html5validator">pip</a>,
    and
    <a href="https://formulae.brew.sh/formula/vnu">brew</a>
    packages of it are also available.

    <p>It is released upstream in these formats:

    <ul>
    <li>pre-compiled Linux, Windows, and macOS binaries that include an
    embedded Java runtime
    <li><code>vnu.jar</code> — a portable version you can use on any system
    that has Java 8 or above installed
    <li><code>vnu.war</code> — for
    <a href="https://validator.github.io/validator/#servlet">deploying the checker service through a servlet container such as Tomcat</a>
    </ul>

    <p class=note><b>Note:</b> The <var>vnu.jar</var> and
    <var>vnu.war</var> files require you to have Java 8 or above installed.
    The pre-compiled Linux, Windows, and macOS binaries don’t require you
    to have any version of Java already installed at all.

    <p>
    You can
    <a href="https://github.com/validator/validator/releases/latest">get the latest release</a>
    or run
    <a href="https://hub.docker.com/r/validator/validator/"><code>docker run -it --rm -p 8888:8888 validator/validator:latest</code></a>,
    <a href="https://www.npmjs.com/package/vnu-jar"><code>npm install vnu-jar</code></a>,
    <a href="https://libraries.io/homebrew/vnu"><code>brew install vnu</code></a>,
    or
    <a href="https://github.com/svenkreiss/html5validator"><code>pip install html5validator</code></a>
    and see the
    <a href="#usage"><b>Usage</b></a>
    and
    <a href="#web-based-checking"><b>Web-based checking</b></a>
    sections below.
    Or automate your document checking with a frontend such as:
<ul>
<li>
<a href="https://github.com/validator/grunt-html">Grunt plugin for HTML validation</a>
or
<a href="https://github.com/validator/gulp-html">Gulp plugin for HTML validation</a>
<li>
<a href="https://github.com/svenkreiss/html5validator">html5validator <code>pip</code> package</a>
(for HTML checking integration in Travis CI, CircleCI, CodeShip, Jekyll,
Pelican, etc.)
<li>
<a href="https://github.com/cvrebert/lmvtfy/">LMVTFY: Let Me Validate That For You</a>
(auto-check HTML of JSFiddle/JSBin, etc., links in GitHub issue comments)
</ul>

<p class=links>
<a href="#usage">Usage</a> ·
<a href="#options">Options</a> ·
<a href="#web-based-checking">Web-based checking</a>

  <div class=set>
  <section id=usage>
  <h2>Usage</h2>

<div>
Run the checker with one of the following invocations:
</div>

<div>• <code>vnu-runtime-image/bin/vnu OPTIONS FILES</code> (Linux or macOS)</div>
<div>• <code>vnu-runtime-image\bin\vnu.bat OPTIONS FILES</code> (Windows)</div>
<div>• <code>java -jar ~/vnu.jar OPTIONS FILES</code> (any system with Java8+ installed)</div>

<p>
…where <i><code>FILES</code></i> are the documents to check, and
<i><code>OPTIONS</code></i> are zero or more of the following options:

<pre>
--errors-only --Werror --exit-zero-always --stdout
--asciiquotes --user-agent USER_AGENT --no-langdetect
--no-stream --filterfile FILENAME --filterpattern PATTERN
--css --skip-non-css --also-check-css
--svg --skip-non-svg --also-check-svg
--html --skip-non-html --format gnu|xml|json|text
--help --verbose --version
</pre>

<p>The <a href="https://validator.github.io/validator/#options">Options</a>
section below provides details on each option, and the rest of this section
provides some specific examples.

<p class=note><b>Note:</b>
Throughout these examples, replace <code>~/vnu.jar</code> with the actual
path to that jar file on your system, and replace
<code>vnu-runtime-image/bin/vnu</code> and
<code>vnu-runtime-image\bin\vnu.bat</code> with the actual path to the
<code>vnu</code> or <code>vnu.bat</code> program on your system — or if you
add the <code>vnu-runtime-image/bin</code> or
<code>vnu-runtime-image\bin</code> directory your system <code>PATH</code>
environment variable, you can invoke the checker with just
<code>vnu</code>.

<p>To check one or more documents from the command line:
<pre>
  vnu-runtime-image/bin/vnu      FILE.html FILE2.html FILE3.html...
</pre>
<pre>
  vnu-runtime-image\bin\vnu.bat  FILE.html FILE2.html FILE3.html...
</pre>
<pre>
  java -jar ~/vnu.jar            FILE.html FILE2.html FILE3.html...
</pre>

<div class=note>
<p><b>Note:</b> If you get a <code>StackOverflowError</code> error when
invoking the checker, try adjusting the thread stack size by providing the
<code>-Xss</code> option to java:</p>

<pre>
  java <span class="option-value">-Xss512k</span> -jar ~/vnu.jar ...
</pre>

<pre>
  vnu-runtime-image/bin/java <span class="option-value">-Xss512k</span> \
      -m vnu/nu.validator.client.SimpleCommandLineValidator ...
</pre>

</div>

<p>To check all documents in a particular directory
<code>DIRECTORY_PATH</code> as HTML:
<pre>
  java -jar ~/vnu.jar            DIRECTORY_PATH
</pre>
<pre>
  vnu-runtime-image/bin/vnu      DIRECTORY_PATH
</pre>
<pre>
  vnu-runtime-image\bin\vnu.bat  DIRECTORY_PATH
</pre>

<h4 id=more-examples>More examples</h4>

<p class=note><b>Note:</b>
The examples in this section assume you have the
<code>vnu-runtime-image/bin</code> or <code>vnu-runtime-image\bin</code>
directory in your system <code>PATH</code> environment variable. If you’re
using the jar file instead, replace <code>vnu</code> in the examples with
<code>java -jar ~/vnu.jar</code>.

<p>To check all documents in a particular directory
<code>DIRECTORY_PATH</code> as HTML, but skip any documents whose names
don’t end with the extensions <code>.html</code>, <code>.htm</code>,
<code>.xhtml</code>, or <code>.xht</code>:

<pre>
  vnu <span class="option-value">--skip-non-html</span> DIRECTORY_PATH
</pre>

<p>To check all documents in a particular directory as CSS:
<pre>
  vnu <span class="option-value">--css</span> DIRECTORY_PATH
</pre>

<p>To check all documents in a particular directory as CSS, but skip any
documents whose names don’t end with the extension <code>.css</code>:
<pre>
  vnu <span class="option-value">--skip-non-css</span> DIRECTORY_PATH
</pre>

<p>To check all documents in a particular directory, with documents whose
names end in the extension <code>.css</code> being checked as CSS, and all
other documents being checked as HTML:
<pre>
  vnu <span class="option-value">--also-check-css</span> DIRECTORY_PATH
</pre>

<p>To check all documents in a particular directory as SVG:
<pre>
  vnu <span class="option-value">--svg</span> DIRECTORY_PATH
</pre>

<p>To check all documents in a particular directory as SVG, but skip any
documents whose names don’t end with the extension <code>.svg</code>:
<pre>
  vnu <span class="option-value">--skip-non-svg</span> DIRECTORY_PATH
</pre>

<p>To check all documents in a particular directory, with documents whose
names end in the extension <code>.svg</code> being checked as SVG, and all
other documents being checked as HTML:
<pre>
  vnu <span class="option-value">--also-check-svg</span> DIRECTORY_PATH
</pre>

<p>To check a Web document:
<pre>
  vnu <var>URL</var>

  example: vnu http://example.com/foo
</pre>

<p>To check standard input:
<pre>
  vnu -

  example:<br>
  echo '&lt;!doctype html>&lt;title>...' | vnu -<br>
  echo '&lt;!doctype html>&lt;title>...' | java -jar ~/vnu.jar -
</pre>

<h3 id="options">Options</h3>
<p>When used from the command line as described in this section, the
checker provides the following options:

<h4 id="asciiquotes">--asciiquotes</h4>
<pre>
Specifies whether ASCII quotation marks are substituted for Unicode
smart quotation marks in messages.

default: [unset; Unicode smart quotation marks are used in messages]
</pre>

<h4 id="errors-only">--errors-only</h4>
<pre>
Specifies that only error-level messages and non-document-error messages
are reported (so that warnings and info messages are not reported).

default: [unset; all messages reported, including warnings & info messages]
</pre>

<h4 id="Werror">--Werror</h4>
<pre>
Makes the checker exit non-zero if any warnings are encountered (even if
there are no errors).

default: [unset; checker exits zero if only warnings are encountered]
</pre>

<h4 id="exit-zero-always">--exit-zero-always</h4>
<pre>
Makes the checker exit zero even if errors are reported for any documents.

default: [unset; checker exits 1 if errors are reported for any documents]
</pre>

<h4 id="stdout">--stdout</h4>
<pre>
Makes the checker report errors and warnings to stdout rather than stderr.

default: [unset; checker reports errors and warnings to stderr]
</pre>

<h4 id="filterfile">--filterfile <var>FILENAME</var></h4>
<pre>
Specifies a filename. Each line of the file contains either a regular
expression or starts with "#" to indicate the line is a comment. Any error
message or warning message that matches a regular expression in the file is
filtered out (dropped/suppressed).

default: [unset; checker does no message filtering]
</pre>

<h4 id="filterpattern">--filterpattern <var>REGEXP</var></h4>
<pre>
Specifies a regular expression. Any error message or warning message that
matches the regular expression is filtered out (dropped/suppressed).

As with all other checker options, this option may only be
specified once. So to filter multiple error messages or warning messages,
you must provide a single regular expression that will match all the
messages. The typical way to do that for regular expressions is to OR
multiple patterns together using the "<code>|</code>" character.

default: [unset; checker does no message filtering]
</pre>

<h4 id="format">--format <var>format</var></h4>
<pre>
Specifies the output format for reporting the results.

default: <span class=option-value>"gnu"</span>

possible values: <span class=option-value>"gnu"</span>, <span class=option-value>"xml"</span>, <span class=option-value>"json"</span>, <span class=option-value>"text"</span> [see information at URL below]

https://github.com/validator/validator/wiki/Service-%C2%BB-Common-params#out
</pre>

<h4 id="help">--help</h4>
<pre>
Shows detailed usage information.
</pre>

<h4 id="skip-non-css">--skip-non-css</h4>
<pre>
Check documents as CSS but skip documents that don’t have *.css extensions.

default: [unset; all documents found are checked]
</pre>

<h4 id="css">--css</h4>
<pre>
Force all documents to be checked as CSS, regardless of extension.

default: [unset]
</pre>

<h4 id="skip-non-svg">--skip-non-svg</h4>
<pre>
Check documents as SVG but skip documents that don’t have *.svg extensions.

default: [unset; all documents found are checked]
</pre>

<h4 id="svg">--svg</h4>
<pre>
Force all documents to be checked as SVG, regardless of extension.

default: [unset]
</pre>

<h4 id="skip-non-html">--skip-non-html</h4>
<pre>
Skip documents that don’t have *.html, *.htm, *.xhtml, or *.xht extensions.

default: [unset; all documents found are checked, regardless of extension]
</pre>

<h4 id="html">--html</h4>
<pre>
Forces any *.xhtml or *.xht documents to be parsed using the HTML parser.

default: [unset; XML parser is used for *.xhtml and *.xht documents]
</pre>

<h4 id="also-check-css">--also-check-css</h4>
<pre>
Check CSS documents (in addition to checking HTML documents).

default: [unset; no documents are checked as CSS]
</pre>

<h4 id="also-check-svg">--also-check-svg</h4>
<pre>
Check SVG documents (in addition to checking HTML documents).

default: [unset; no documents are checked as SVG]
</pre>

<h4 id="user-agent">--user-agent <var>USER_AGENT</var></h4>
<pre>
Specifies the value of the <code>User-Agent</code> request header to send when
checking HTTPS/HTTP URLs.

default: <span class=option-value>"Validator.nu/LV"</span>
</pre>

<h4 id="no-langdetect">--no-langdetect</h4>
<pre>
Disables language detection, so that documents are not checked for missing
or mislabeled <code>html[lang]</code> attributes.

default: [unset; language detection &amp; <code>html[lang]</code> checking are performed]
</pre>

<h4 id="no-stream">--no-stream</h4>
<pre>
Forces all documents to be be parsed in buffered mode instead of streaming
mode (causes some parse errors to be treated as non-fatal document errors
instead of as fatal document errors).

default: [unset; non-streamable parse errors cause fatal document errors]
</pre>

<h4 id="verbose">--verbose</h4>
<pre>
Specifies "verbose" output. (Currently this just means that the names of
files being checked are written to stdout.)

default: [unset; output is not verbose]
</pre>

<h4 id="version">--version</h4>
<pre>
Shows the checker version number.
</pre>
</section>
</div>

<h2 id="web-based-checking">Web-based checking</h2>

  <p>The Nu Html Checker — along with being usable as
  <a href="https://validator.github.io/validator/#usage">a standalone command-line client</a> — can
  be run as an HTTP service, similar to
  <a href="https://validator.w3.org/nu/">validator.w3.org/nu</a>,
  for browser-based checking of HTML documents, CSS stylesheets, and SVG
  images over the Web.
  To that end, the checker is released as several separate packages:
  <ul>
  <li>Linux, Windows, and macOS binaries for
  <a href="#standalone">deploying the checker as a simple self-contained service</a> on any system
  <li><code>vnu.jar</code> for
  <a href="#standalone">deploying the checker as a simple self-contained service</a> on a system with Java installed
  <li><code>vnu.war</code> for
  <a href="#servlet">deploying the checker to a servlet container such as Tomcat</a>
  </ul>
  <p>
  All deployments expose a REST API that enables checking of HTML
  documents, CSS stylesheets, and SVG images from other clients, not just
  web browsers. And the Linux, Windows, and macOS binaries and
  <code>vnu.jar</code> package also include
  <a href="#http-client">a simple HTTP client</a> that enables you to
  either send documents to a locally-running instance of the checker HTTP
  service — for fast command-line checking — or to any remote instance of the
  checker HTTP service running anywhere on the Web.
  <p>
  The
  <a href="https://github.com/validator/validator/releases/latest" >latest
  releases of the Linux, Windows, and macOS binaries and vnu.jar and
  vnu.war packages</a>
  are available from the <code>validator</code> project at github.
  The following are detailed instructions on using them.

<p class=note><b>Note:</b>
Throughout these instructions, replace <code>~/vnu.jar</code> with the
actual path to that jar file on your system, and replace
<code>vnu-runtime-image/bin/java</code> and
<code>vnu-runtime-image\bin\java.exe</code> with the actual path to the
checker <code>java</code> or <code>java.exe</code> program on your system —
or if you add the <code>vnu-runtime-image/bin</code> or
<code>vnu-runtime-image\bin</code> directory your system <code>PATH</code>
environment variable, you can invoke the checker with just
<code>java nu.validator.servlet.Main 8888</code>.

<p class=links>
<a href="#standalone">Standalone</a> ·
<a href="#servlet">Servlet</a> ·
<a href="#http-client">Client</a> ·
<a href="#http-client-options">Options</a>

  <div class=set>
  <section id=standalone>
    <h3>Standalone web server</h3>
    <p>To run the checker as a standalone service (using a built-in
    Jetty server), open a new terminal window and invoke the checker
    like this:

<pre>java -cp ~/vnu.jar              <span class=java-class>nu.validator.servlet.Main</span> <span class=arg>8888</span>
</pre>
<pre>vnu-runtime-image/bin/java      <span class=java-class>nu.validator.servlet.Main</span> <span class=arg>8888</span>
</pre>
<pre>vnu-runtime-image\bin\java.exe  <span class=java-class>nu.validator.servlet.Main</span> <span class=arg>8888</span>
</pre>

    <p>Then open
    <a href="http://0.0.0.0:8888">http://0.0.0.0:8888</a>
    in a browser. (To listen on a different port, replace <code
    class=arg>8888</code> with the port number.)

<div class=note>
<p>
<b>Warning:</b> Future checker releases will bind by default to the
address <code>127.0.0.1</code>. Your checker deployment might become
unreachable unless you use the
<code>nu.validator.servlet.bind-address</code> system property to bind the
checker to a different address:

<pre>java -cp ~/vnu.jar \
    <span class="option-value">-Dnu.validator.servlet.bind-address=128.30.52.73</span> \
    <span class=arg>nu.validator.servlet.Main</span> <span class=arg>8888</span>
</pre>
<pre>vnu-runtime-image/bin/java \
    <span class="option-value">-Dnu.validator.servlet.bind-address=128.30.52.73</span> \
    <span class=arg>nu.validator.servlet.Main</span> <span class=arg>8888</span>
</pre>
<pre>vnu-runtime-image\bin\java.exe  \
    <span class="option-value">-Dnu.validator.servlet.bind-address=128.30.52.73</span> \
    <span class=arg>nu.validator.servlet.Main</span> <span class=arg>8888</span>
</pre>

</div>

    <p>
    When you open <a href="http://0.0.0.0:8888">http://0.0.0.0:8888</a> (or
    whatever URL corresponds to the
    <code>nu.validator.servlet.bind-address</code> value you’re using),
    you’ll see a form similar to <a
    href="https://validator.w3.org/nu/">validator.w3.org/nu</a> that allows
    you to enter the URL of an HTML document, CSS stylesheet, or SVG image,
    and have the results of checking that resource displayed in the browser.

<div class=note>
<p><b>Note:</b> If you get a <code>StackOverflowError</code>
error when using the checker, try adjusting the thread stack size by
providing the <code>-Xss</code> option to java:

<pre>
  java <span class="option-value">-Xss512k</span> -cp ~/vnu.jar nu.validator.servlet.Main 8888
</pre>

<pre>
  vnu-runtime-image/bin/java <span class="option-value">-Xss512k</span> -m vnu/nu.validator.servlet.Main 8888
</pre>

</div>
  </section>
  <section id=servlet>
    <h3>Deployment to servlet container</h3>
    <p>To run the checker inside of an existing servlet container
    such as Apache Tomcat you will need to deploy the <code>vnu.war</code>
    file to that server following its documentation.
    For example, on Apache Tomcat you could do this using
    the <a href="https://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html">Manager</a> application or simply by copying the file to
    the <code>webapps</code> directory
    (since that is the default <code>appBase</code> setting).
	Typically you would see a message similar to the following
	in the <code>catalina.out</code> log file.
<pre>
May 7, 2014 4:42:04 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/vnu.war
</pre>

    <p>Assuming your servlet container is configured to receive HTTP
    requests sent to <code>localhost</code> on port <code>80</code>
    and the context root of this application is <code>vnu</code>
    (often the default behavior is to use the WAR file's filename
    as the context root unless one is explicitly specified)
    you should be able to access the application by connecting
    to <a href="http://localhost/vnu/">http://localhost/vnu/</a>.

<div class=note>
<p>
    <b>Note:</b> You may want to customize the
    <code>/WEB-INF/web.xml</code> file inside the WAR file (you can use any
    ZIP-handling program) to modify the servlet filter configuration.
    For example, if you wanted to disable the inbound-size-limit filter,
    you could comment out that filter like this:
    <pre>
&lt;!--
  &lt;filter>
      &lt;filter-name>inbound-size-limit-filter&lt;/filter-name>
      &lt;filter-class>nu.validator.servlet.InboundSizeLimitFilter&lt;/filter-class>
  &lt;/filter>
  &lt;filter-mapping>
      &lt;filter-name>inbound-size-limit-filter&lt;/filter-name>
      &lt;url-pattern>/*&lt;/url-pattern>
  &lt;/filter-mapping>
--></pre>
</div>

  </section>
  <section id=http-client>
  <h3>HTTP client (for fast command-line checking)</h3>

    <p>The checker is packaged with an HTTP client you can use from the
    command line to either send documents to a locally-running instance of
    the checker HTTP service — for fast command-line checking — or to a
    remote instance anywhere on the Web.
    <p>
    To check documents locally using the packaged HTTP client, do this:
    <ol>
      <li>Start up the checker as a local HTTP service, as described in the
      <b><a href="#standalone">Standalone web server</a></b>
      section.
      <li>Open a new terminal window and invoke the HTTP client like this:

<pre>java -cp ~/vnu.jar <span class=java-class>nu.validator.client.HttpClient</span> FILE.html...
</pre>
<pre>vnu-runtime-image/bin/java <span class=java-class>nu.validator.client.HttpClient</span> FILE.html...
</pre>
</ol>
     To send documents to an instance of the checker on the Web, such as
     <a href="https://html5.validator.nu/">html5.validator.nu/</a>,
     use the
     <a href="#nuvalidatorclienthost">nu.validator.client.host</a>
     and
     <a href="#nuvalidatorclientport">nu.validator.client.port</a>
     options, like this:
<pre class=aligned>
java -cp ~/vnu.jar <span class=java-property>-Dnu.validator.client.port=80</span> \
    <span class=java-property>-Dnu.validator.client.host=html5.validator.nu</span> \
    nu.validator.client.HttpClient FILE.html...
</pre>
     …or like this:
<pre class=aligned>
vnu-runtime-image/bin/java <span class=java-property>-Dnu.validator.client.port=80</span> \
    <span class=java-property>-Dnu.validator.client.host=html5.validator.nu</span> \
    nu.validator.client.HttpClient FILE.html...
</pre>

    <p>Other options are documented below.

    <h3 id="http-client-options">HTTP client options</h3>

    <p>When using the packaged HTTP client for sending documents to an instance
    of the checker HTTP service for checking, you can set Java system
    properties to control configuration options for the checker behavior.

    <p>For example, you can suppress warning-level messages and only
    show error-level ones by setting the value of the
    <code>nu.validator.client.level</code> system property to
    <code>error</code>, like this:

<pre class=aligned>
java <span class=java-property>-Dnu.validator.client.level=error</span> \
       -cp ~/vnu.jar nu.validator.client.HttpClient FILE.html...
</pre>
     …or like this:
<pre class=aligned>
vnu-runtime-image/bin/java <span class=java-property>-Dnu.validator.client.level=error</span> \
       -cp ~/vnu.jar nu.validator.client.HttpClient FILE.html...
</pre>

    <p>Most of the properties listed below map to the common input
    parameters for the checker service, as documented at
    <a href="https://github.com/validator/validator/wiki/Service-%C2%BB-Common-params"
      >github.com/validator/validator/wiki/Service-»-Common-params</a>.

<h4 id="nuvalidatorclienthost">nu.validator.client.host</h4>
<pre>
Specifies the hostname of the checker for the client to connect to.

default: <span class=option-value>"127.0.0.1"</span>
</pre>

<h4 id="nuvalidatorclientport">nu.validator.client.port</h4>
<pre>
Specifies the hostname of the checker for the client to connect to.

default: <span class=option-value>"8888"</span>

example: java -Dnu.validator.client.port=8080 -jar ~/vnu.jar FILE.html
</pre>

<h4 id="nuvalidatorclientlevel">nu.validator.client.level</h4>
<pre>
Specifies the severity level of messages to report; to
suppress warning-level messages, and only show error-level ones, set
this property to "error".

default: [unset]

possible values: <span class=option-value>"error"</span>

example: java -Dnu.validator.client.level=error -jar ~/vnu.jar FILE.html
</pre>

<h4 id="nuvalidatorclientparser">nu.validator.client.parser</h4>
<pre>
Specifies which parser to use.

default: <span class=option-value>"html"</span>; or, for *.xhtml input files, <span class=option-value>"xml"</span>

possible values: [see information at URL below]

https://github.com/validator/validator/wiki/Service-%C2%BB-Common-params#parser
</pre>

<h4 id="nuvalidatorclientcharset">nu.validator.client.charset</h4>
<pre>
Specifies the encoding of the input document.

default: [unset]
</pre>

<h4 id="nuvalidatorclientcontent-type">nu.validator.client.content-type</h4>
<pre>
Specifies the content-type of the input document.

default: <span class=option-value>"text/html"</span>; or, for *.xhtml files, <span class=option-value>"application/xhtml+xml"</span>
</pre>

<h4 id="nuvalidatorclientout">nu.validator.client.out</h4>
<pre>
Specifies the output format for messages.

default: "gnu"

possible values: [see information at URL below]

https://github.com/validator/validator/wiki/Service-%C2%BB-Common-params#out
</pre>

<h4 id="nuvalidatorclientasciiquotes">nu.validator.client.asciiquotes</h4>
<pre>
Specifies whether ASCII quotation marks are substituted for Unicode
smart quotation marks in messages.

default: "yes"

possible values: "yes" or "no"
</pre>

    <h3 id="http-servlet-options">HTTP servlet options</h3>

<h4 id="nuvalidatorservletbindaddress">nu.validator.servlet.bind-address</h4>
<pre>
Binds the validator service to the specified IP address.

default: 0.0.0.0 [causes the checker to listen on all interfaces]

possible values: The IP address of any network interface

example: -Dnu.validator.servlet.bind-address=127.0.0.1
</pre>

<h4 id="nuvalidatorservletconnectiontimeout">nu.validator.servlet.connection-timeout</h4>
<pre>
Specifies the connection timeout.

default: 5000

possible values: number of milliseconds

example: -Dnu.validator.servlet.connection-timeout=5000
</pre>

<h4 id="nuvalidatorservletsockettimeout">nu.validator.servlet.socket-timeout</h4>
<pre>
Specifies the socket timeout.

default: 5000

possible values: number of milliseconds

example: -Dnu.validator.servlet.socket-timeout=5000
</pre>

  </section>
</div>
<section id="dockerhub">
<h2>Pulling from Docker Hub</h2>
<p>
You can pull the checker from the
<a href="https://hub.docker.com/r/validator/validator/">https://hub.docker.com/r/validator/validator/</a>
repo at Docker Hub.
<div class=set>
<p>To pull and run the latest version of the checker:</p>
<pre>
  docker run -it --rm -p 8888:8888 validator/validator:latest
</pre>

<p>To pull and run a specific Docker-Hub tag/version of the checker —
for example, the <code>17.11.1</code> version:</p>
<pre>
  docker run -it --rm -p 8888:8888 validator/validator:17.11.1
</pre>

<p>To bind the checker to a specific address (rather than have it listening
on all interfaces):
<pre>
  docker run -it --rm -p <span class=option-value>128.30.52.73:8888:8888</span> validator/validator:latest
</pre>

<p>To make the checker run with a connection timeout and socket timeout
different than the default 5 seconds, use the
<code>CONNECTION_TIMEOUT_SECONDS</code> and
<code>SOCKET_TIMEOUT_SECONDS</code> environment variables:</p>
<pre>
  docker run -it --rm \
     <span class=option-value>-e CONNECTION_TIMEOUT_SECONDS=15</span> \
     <span class=option-value>-e SOCKET_TIMEOUT_SECONDS=15</span> \
     -p 8888:8888 \
     validator/validator
</pre>

<p>To make the checker run with particular Java system properties set,
use the <code>JAVA_TOOL_OPTIONS</code> environment variable:
<pre>
  docker run -it --rm \
     <span class=option-value>-e JAVA_TOOL_OPTIONS=-Dnu.validator.client.asciiquotes=yes </span> \
     -p 8888:8888 \
     validator/validator
</pre>


<p>
To define a service named <code>vnu</code> for use with <code>docker
compose</code>, create a Compose file named <code>docker-compose.yml</code>
(for example), with contents such as the following:</p>

<pre>
  version: '2'
  services:
    vnu:
      image: validator/validator
      ports:
        - "8888:8888"
      network_mode: "host" #so "localhost" refers to the host machine.
</pre>
</div>
</section>

<section id="build-instructions">
<h2>Build instructions</h2>
<p>
Follow the steps below to build, test, and run the checker such that you can open
<code>http://0.0.0.0:8888/</code> in a Web browser to use the checker Web UI.

<div class=set>
<ol>
<li>Make sure you have git, python, and JDK 8 or above installed.

<li>Set the <code>JAVA_HOME</code> environment variable:
<pre>export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64    &lt;-- Ubuntu, etc.</pre>
<pre>export JAVA_HOME=$(/usr/libexec/java_home)            &lt;-- MacOS</pre>

<li>Create a working directory:
<pre>git clone https://github.com/validator/validator.git</pre>

<li>Change into your working directory:
<pre>cd validator</pre>

<li>Start the checker Python script:
<pre>python ./checker.py all</pre>

<p class=note>
The first time you run the checker Python script, you’ll need to be online
and the build will need time to download several megabytes of dependencies.
</li>
</ol>

<p>
The steps above will build, test, and run the checker such that you can open
<code>http://0.0.0.0:8888/</code> in a Web browser to use the checker Web UI.

<div class=note>
<p>
<b>Warning:</b> Future checker releases will bind by default to the
address <code>127.0.0.1</code>. Your checker deployment might become
unreachable unless you use the <code>--bind-address</code> option to bind
the checker to a different address:

<pre>python ./checker.py <span class="option-value">--bind-address=128.30.52.73</span> <span class=arg>all</span></pre>

</div>

<p>
Use <code>python ./checker.py --help</code> to see command-line
options for controlling the behavior of the script, as well as build-target
names you can call separately; e.g.:

<ul>
<li><pre>python ./checker.py build  # to build only</pre>
<li><pre>python ./checker.py build  # test to build and test</pre>
<li><pre>python ./checker.py run    # to run only</pre>
<li><pre>python ./checker.py jar    # to compile <code>vnu.jar</code></pre>
<li><pre>python ./checker.py update-shallow && \
  python ./checker.py dldeps && \
  python ./checker.py jar  # compile vnu.jar faster</pre>
</ul>
</div>
</section>
